$(function(){
	let b = document.querySelector(".banner .page b");
	let line = document.querySelector(".banner .page i");
	let span = document.querySelector(".banner .page span");
	let num = 0;
	// $(".banner").slide({titCell:'.hd ul',pageStateCell:".pageState",mainCell:'.bd ul',autoPlay:true,autoPage:true,effect:'left',prevCell:".banner_prev",nextCell:".banner_next",delayTime:1000,interTime: 5000,startFun: function(i,c){
	// 	num = 100 * (i + 1) / c ;
	// 	b.textContent = "0" + (i + 1);
	// 	span.textContent = "0" + c;
	// 	if(i + 1 === c) {
	// 		span.style.opacity = "1"
	// 	} else {
	// 		span.style.opacity = "0.33"
	// 	}
	// 	line.style.backgroundImage = "linear-gradient(90deg,#FFFFFF " + num + "%, rgba(255,255,255,.33) " + num + "%)"
	// }});
	
	
	let $text=$('.banner .pageState').html();
	if(!!$text){
		$text=$text.split('');
		$text.splice(14,1,'');
		$('.banner .pageState').html($text.join(''));
	}
	$(".hot_banner").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"left",autoPlay:true,vis:2});
	$('.close').on('click',function(){$('.login').hide();$('.zhezhao').hide();});
	$('.serch .vip').click(function(){$('.login').show();$('.zhezhao').show();});
	$(".p1_banner").slide({
		titCell:".hslide li",
		mainCell:".bd ul", 
		effect:"left", 
		delayTime:200,
		trigger: "click",
		prevCell:".banner_prev",
		nextCell:".banner_next" ,
	});
	//小图左滚动切换
	$(".p1_banner").slide({
		mainCell:".hd.t0 ul",
		vis:5,
		effect:"left",
		trigger: "click",
		prevCell:".banner_prev",
		nextCell:".banner_next" ,
	});
	//小图左滚动切换
	$(".p1_banner").slide({
		mainCell:".hd.t1 ul",
		vis:5,
		effect:"top",
		trigger: "click",
		prevCell:".banner_prev",
		nextCell:".banner_next" ,
	});
	
	$("[data-fancybox]").fancybox({
		buttons: [
			"zoom",
			"download",
			"close"
		],
		animationEffect: "fade",
	});
	
	$(".news_banner").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"left",autoPlay:true});
	
	
})
